<div ng-controller="StoredistributionCtrl" ng-init="addAction()" class="sui-form form-horizontal">
    <ul class="sui-breadcrumb">
        <li><a href="#/storedistribution/list">{{'store'|translate}}</a></li>
        <li class="active"> {{store.store_id?'edit':'add_new'|translate}}</li>
    </ul>
    <form name="storeForm" novalidate>
        <div class="control-group">
            <label class="control-label v-top">{{'分账店铺'|translate}}:</label>
            <div class="controls">
                <store-list ng-model="store.store_id" home="1" ng-if="!store.fs_id"></store-list>
                <store-list ng-model="store.store_id" stype="1" home="1" ng-if="store.fs_id"></store-list>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'分账类型'|translate}}:</label>
            <div class="controls">
                <fzgroup-get ng-model="store.fz_group_id"></fzgroup-get>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'支付类型'|translate}}:</label>
            <div class="controls">
                <fz-type ng-model="store.fz_type" dft='1'></fz-type>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type ==2">
            <label class="control-label v-top">{{'银联分账配置'|translate}}:</label>
            <div class="controls">
                渠道ID :<input ng-model="store.config.ChlID" type="text" class="input-xlarge">
                <br/><br/> 对公商户代码 :<input ng-model="store.config.GMerID" type="text" class="input-xlarge">
                <br/><br/> 对公终端代码 :<input ng-model="store.config.GTermID" type="text" class="input-xlarge">
                <br/><br/> 对私商户代码 :<input ng-model="store.config.SMerID" type="text" class="input-xlarge">
                <br/><br/> 对私终端代码 :<input ng-model="store.config.STermID" type="text" class="input-xlarge">
                <br/><br/> 商户名称 :<input ng-model="store.config.MerName" type="text" class="input-xlarge">
                <br/><br/> 密钥 :<input ng-model="store.config.Key" type="text" class="input-xlarge">
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type ==3">
            <label class="control-label v-top">{{'z1新生用户ID'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z1.subUserId" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'z1账号名称'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z1name" type="text" class="input-xlarge">
            </div>
        </div>
        <!-- //微信分账需要字段 -->
        <div class="control-group" ng-if="store.fz_type ==1">
            <label class="control-label v-top">{{'z1账号配置'|translate}}:</label>
            <div class="controls">
                分账接收方类型 :
                <wx-type ng-model="store.z1.type"></wx-type>
                <br/><br/> 分账接收方帐号 :<input ng-model="store.z1.account" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type ==2">
            <label class="control-label v-top">{{'z1账号配置'|translate}}:</label>
            <div class="controls">
                入账账户类型 :
                <ylacc-type ng-model="store.z1.AccType"></ylacc-type>
                <br/><br/> 入账账户 :<input ng-model="store.z1.AccNo" type="text" class="input-xlarge"> <br/><br/> 入账账户名称 :<input ng-model="store.z1.AccName" type="text" class="input-xlarge"><br/><br/>
                <div ng-show="store.z1.AccType==0">
                    入账开户行名称 :<input ng-model="store.z1.IssInsName" type="text" class="input-xlarge">
                    <br/><br/>
                </div>
                <div ng-show="store.z1.AccType==0">
                    入账开户机构代码 :<input ng-model="store.z1.IssInsCode" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type == 3">
            <label class="control-label v-top">{{'z1账号配置'|translate}}:</label>
            <div class="controls">
                入账账户类型 :
                <xs-zf-type ng-model="store.z1.type"></xs-zf-type>
                <br/><br/> {{store.z1.type == 0?'身份证号码':'组织机构号'}} :<input ng-model="store.z1.idNo" type="text" class="input-xlarge">
                <br/><br/> 分账方名称 :<input ng-model="store.z1.name" type="text" class="input-xlarge">
                <br/><br/> 分账方结算币种 :
                <xs-hb-dm ng-model="store.z1.currencyCode"></xs-hb-dm>
                <br/><br/> 分账方所在地 :
                <xs-fz-region ng-model="store.z1.region"></xs-fz-region>
                <br/><br/>
                <div ng-show="store.z1.region == 0">
                    分账方所在国 :
                    <xs-fz-country ng-model="store.z1.country"></xs-fz-country>
<!--                    <br/><br/> 分账方所在省 :<input ng-model="store.z1.province" type="text" name="province" class="input-xlarge">-->
<!--                    <br/><br/> 分账方所在市 :<input ng-model="store.z1.city" type="text" name="city" class="input-xlarge">-->
                    <br/><br/> 结算银行名称 :<input ng-model="store.z1.bankName" type="text" class="input-xlarge">
                    <br/><br/> 结算银行账号 :<input ng-model="store.z1.bankAcctNo" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type ==3">
            <label class="control-label v-top">{{'z2新生用户ID'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z2.subUserId" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'z2账号名称'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z2name" type="text" class="input-xlarge">
            </div>
        </div>
        <!-- //微信分账需要字段 -->
        <div class="control-group" ng-if="store.fz_type ==1">
            <label class="control-label v-top">{{'z2账号配置'|translate}}:</label>
            <div class="controls">
                分账接收方类型 :
                <wx-type ng-model="store.z2.type"></wx-type>
                <br/><br/> 分账接收方帐号 :<input ng-model="store.z2.account" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type ==2">
            <label class="control-label v-top">{{'z2账号配置'|translate}}:</label>
            <div class="controls">
                <!-- 交易币种   :<input ng-model="store.z2.CurrencyCode" type="text"  class="input-xlarge"> <br/><br/> -->
                入账账户类型 :
                <ylacc-type ng-model="store.z2.AccType"></ylacc-type> <br/><br/> 入账账户 :<input ng-model="store.z2.AccNo" type="text" class="input-xlarge"><br/><br/> 入账账户名称 :<input ng-model="store.z2.AccName" type="text" class="input-xlarge"><br/><br/>
                <div ng-show="store.z2.AccType==0">
                    入账开户行名称 :<input ng-model="store.z2.IssInsName" type="text" class="input-xlarge">
                    <br/><br/>
                </div>
                <div ng-show="store.z2.AccType==0">
                    入账开户机构代码 :<input ng-model="store.z2.IssInsCode" type="text" class="input-xlarge">
                </div>
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type == 3">
            <label class="control-label v-top">{{'z2账号配置'|translate}}:</label>
            <div class="controls">
                入账账户类型 :
                <xs-zf-type ng-model="store.z2.type"></xs-zf-type>
                <br/><br/> {{store.z2.type == 0?'身份证号码':'组织机构号'}} :<input ng-model="store.z2.idNo" type="text" class="input-xlarge">
                <br/><br/> 分账方名称 :<input ng-model="store.z2.name" type="text" class="input-xlarge">
                <br/><br/> 分账方结算币种 :
                <xs-hb-dm ng-model="store.z2.currencyCode"></xs-hb-dm>
                <br/><br/> 分账方所在地 :
                <xs-fz-region ng-model="store.z2.region"></xs-fz-region>
                <br/><br/>
                <div ng-show="store.z2.region == 0">
                    分账方所在国 :
                    <xs-fz-country ng-model="store.z2.country"></xs-fz-country>
<!--                    <br/><br/> 分账方所在省 :<input ng-model="store.z2.province" type="text" name="province" class="input-xlarge">-->
<!--                    <br/><br/> 分账方所在市 :<input ng-model="store.z2.city" type="text" name="city" class="input-xlarge">-->
                    <br/><br/> 结算银行名称 :<input ng-model="store.z2.bankName" type="text" class="input-xlarge">
                    <br/><br/> 结算银行账号 :<input ng-model="store.z2.bankAcctNo" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type ==3">
            <label class="control-label v-top">{{'z3新生用户ID'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z3.subUserId" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'z3账号名称'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z3name" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type ==1">
            <label class="control-label v-top">{{'z3账号配置'|translate}}:</label>
            <div class="controls">
                分账接收方类型 :
                <wx-type ng-model="store.z3.type"></wx-type>
                <br/><br/> 分账接收方帐号 :<input ng-model="store.z3.account" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type ==2">
            <label class="control-label v-top">{{'z3账号配置'|translate}}:</label>
            <div class="controls">

                入账账户类型 :
                <ylacc-type ng-model="store.z3.AccType"></ylacc-type> <br/> <br/> 入账账户 :<input ng-model="store.z3.AccNo" type="text" class="input-xlarge"> <br/> <br/> 入账账户名称 :<input ng-model="store.z3.AccName" type="text" class="input-xlarge"><br/> <br/>
                <div ng-show="store.z3.AccType==0">
                    入账开户行名称 :<input ng-model="store.z3.IssInsName" type="text" class="input-xlarge">
                    <br/><br/>
                </div>
                <div ng-show="store.z3.AccType==0">
                    入账开户机构代码 :<input ng-model="store.z3.IssInsCode" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type == 3">
            <label class="control-label v-top">{{'z3账号配置'|translate}}:</label>
            <div class="controls">
                入账账户类型 :
                <xs-zf-type ng-model="store.z3.type"></xs-zf-type>
                <br/><br/> {{store.z3.type == 0?'身份证号码':'组织机构号'}} :<input ng-model="store.z3.idNo" type="text" class="input-xlarge">
                <br/><br/> 分账方名称 :<input ng-model="store.z3.name" type="text" class="input-xlarge">
                <br/><br/> 分账方结算币种 :
                <xs-hb-dm ng-model="store.z3.currencyCode"></xs-hb-dm>
                <br/><br/> 分账方所在地 :
                <xs-fz-region ng-model="store.z3.region"></xs-fz-region>
                <br/><br/>
                <div ng-show="store.z3.region == 0">
                    分账方所在国 :
                    <xs-fz-country ng-model="store.z3.country"></xs-fz-country>
<!--                    <br/><br/> 分账方所在省 :<input ng-model="store.z3.province" type="text" name="province" class="input-xlarge">-->
<!--                    <br/><br/> 分账方所在市 :<input ng-model="store.z3.city" type="text" name="city" class="input-xlarge">-->
                    <br/><br/> 结算银行名称 :<input ng-model="store.z3.bankName" type="text" class="input-xlarge">
                    <br/><br/> 结算银行账号 :<input ng-model="store.z3.bankAcctNo" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type ==3">
            <label class="control-label v-top">{{'z4新生用户ID'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z4.subUserId" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'z4账号名称'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z4name" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type ==1">
            <label class="control-label v-top">{{'z4账号配置'|translate}}:</label>
            <div class="controls">
                分账接收方类型 :
                <wx-type ng-model="store.z4.type"></wx-type>
                <br/><br/> 分账接收方帐号 :<input ng-model="store.z4.account" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type ==2">
            <label class="control-label v-top">{{'z4账号配置'|translate}}:</label>
            <div class="controls">

                入账账户类型 :
                <ylacc-type ng-model="store.z4.AccType"></ylacc-type> <br/> <br/> 入账账户 :<input ng-model="store.z4.AccNo" type="text" class="input-xlarge"> <br/> <br/> 入账账户名称 :<input ng-model="store.z4.AccName" type="text" class="input-xlarge"><br/><br/>
                <div ng-show="store.z4.AccType==0">
                    入账开户行名称 :<input ng-model="store.z4.IssInsName" type="text" class="input-xlarge">
                    <br/><br/>
                </div>
                <div ng-show="store.z4.AccType==0">
                    入账开户机构代码 :<input ng-model="store.z4.IssInsCode" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type == 3">
            <label class="control-label v-top">{{'z4账号配置'|translate}}:</label>
            <div class="controls">
                入账账户类型 :
                <xs-zf-type ng-model="store.z4.type"></xs-zf-type>
                <br/><br/> {{store.z4.type == 0?'身份证号码':'组织机构号'}} :<input ng-model="store.z4.idNo" type="text" class="input-xlarge">
                <br/><br/> 分账方名称 :<input ng-model="store.z4.name" type="text" class="input-xlarge">
                <br/><br/> 分账方结算币种 :
                <xs-hb-dm ng-model="store.z4.currencyCode"></xs-hb-dm>
                <br/><br/> 分账方所在地 :
                <xs-fz-region ng-model="store.z4.region"></xs-fz-region>
                <br/><br/>
                <div ng-show="store.z4.region == 0">
                    分账方所在国 :
                    <xs-fz-country ng-model="store.z4.country"></xs-fz-country>
<!--                    <br/><br/> 分账方所在省 :<input ng-model="store.z4.province" type="text" name="province" class="input-xlarge">-->
<!--                    <br/><br/> 分账方所在市 :<input ng-model="store.z4.city" type="text" name="city" class="input-xlarge">-->
                    <br/><br/> 结算银行名称 :<input ng-model="store.z4.bankName" type="text" class="input-xlarge">
                    <br/><br/> 结算银行账号 :<input ng-model="store.z4.bankAcctNo" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type ==3">
            <label class="control-label v-top">{{'z5新生用户ID'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z5.subUserId" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'z5账号名称'|translate}}:</label>
            <div class="controls">
                <input ng-model="store.z5name" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type ==1">
            <label class="control-label v-top">{{'z5账号配置'|translate}}:</label>
            <div class="controls">
                分账接收方类型 :
                <wx-type ng-model="store.z5.type"></wx-type>
                <br/><br/> 分账接收方帐号 :<input ng-model="store.z5.account" type="text" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-if="store.fz_type ==2">
            <label class="control-label v-top">{{'z5账号配置'|translate}}:</label>
            <div class="controls">
                入账账户类型 :
                <ylacc-type ng-model="store.z5.AccType"></ylacc-type> <br/> <br/> 入账账户 :<input ng-model="store.z5.AccNo" type="text" class="input-xlarge"> <br/> <br/> 入账账户名称 :<input ng-model="store.z5.AccName" type="text" class="input-xlarge">
                <br/><br/>
                <div ng-show="store.z5.AccType==0">
                    入账开户行名称 :<input ng-model="store.z5.IssInsName" type="text" class="input-xlarge">
                    <br/><br/>
                </div>
                <div ng-show="store.z5.AccType==0">
                    入账开户机构代码 :<input ng-model="store.z5.IssInsCode" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group" ng-if="store.fz_type == 3">
            <label class="control-label v-top">{{'z5账号配置'|translate}}:</label>
            <div class="controls">
                入账账户类型 :
                <xs-zf-type ng-model="store.z5.type"></xs-zf-type>
                <br/><br/> {{store.z5.type == 0?'身份证号码':'组织机构号'}} :<input ng-model="store.z5.idNo" type="text" class="input-xlarge">
                <br/><br/> 分账方名称 :<input ng-model="store.z5.name" type="text" class="input-xlarge">
                <br/><br/> 分账方结算币种 :
                <xs-hb-dm ng-model="store.z5.currencyCode"></xs-hb-dm>
                <br/><br/> 分账方所在地 :
                <xs-fz-region ng-model="store.z5.region"></xs-fz-region>
                <br/><br/>
                <div ng-show="store.z5.region == 0">
                    分账方所在国 :
                    <xs-fz-country ng-model="store.z5.country"></xs-fz-country>
<!--                    <br/><br/> 分账方所在省 :<input ng-model="store.z5.province" type="text" name="province" class="input-xlarge">-->
<!--                    <br/><br/> 分账方所在市 :<input ng-model="store.z5.city" type="text" name="city" class="input-xlarge">-->
                    <br/><br/> 结算银行名称 :<input ng-model="store.z5.bankName" type="text" class="input-xlarge">
                    <br/><br/> 结算银行账号 :<input ng-model="store.z5.bankAcctNo" type="text" class="input-xlarge">
                </div>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <button ng-click="storeAdd()" class="sui-btn btn-primary" ng-disabled="!store.store_id">
                    {{'save' | translate}}
                </button>
            </div>
        </div>
    </form>
</div>